/*
 * Copyright (c) Jiandong.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */


export class Assertions {
    static assertCondition(condition: boolean, message: string = "error"): void | never {
        if (!condition) throw Error(message)
    }

    static assertNotNull(condition: boolean, message: string = "error"): boolean | never {
      if (!condition) throw Error("is null")
      return condition
    }
}
